3.4.60 \(\int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx\) [360]

3.4.60.1 Optimal result
3.4.60.2 Mathematica [C] (verified)
3.4.60.3 Rubi [A] (verified)
3.4.60.4 Maple [A] (verified)
3.4.60.5 Fricas [B] (verification not implemented)
3.4.60.6 Sympy [F]
3.4.60.7 Maxima [A] (verification not implemented)
3.4.60.8 Giac [B] (verification not implemented)
3.4.60.9 Mupad [B] (verification not implemented)

3.4.60.1 Optimal result

Integrand size = 27, antiderivative size = 122 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {b \left (a^2-b^2\right ) \arctan (\sinh (c+d x))}{2 \left (a^2+b^2\right )^2 d}+\frac {a b^2 \log (\cosh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {a b^2 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2 d}-\frac {\text {sech}^2(c+d x) (a-b \sinh (c+d x))}{2 \left (a^2+b^2\right ) d} \]

output
-1/2*b*(a^2-b^2)*arctan(sinh(d*x+c))/(a^2+b^2)^2/d+a*b^2*ln(cosh(d*x+c))/( 
a^2+b^2)^2/d-a*b^2*ln(a+b*sinh(d*x+c))/(a^2+b^2)^2/d-1/2*sech(d*x+c)^2*(a- 
b*sinh(d*x+c))/(a^2+b^2)/d
 
3.4.60.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.47 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.07 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {i \left (-\frac {b \log (i-\sinh (c+d x))}{(a+i b)^2}+\frac {b \log (i+\sinh (c+d x))}{(a-i b)^2}-\frac {4 i a b^2 \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right )^2}-\frac {1}{(a+i b) (-i+\sinh (c+d x))}+\frac {1}{(a-i b) (i+\sinh (c+d x))}\right )}{4 d} \]

input
Integrate[(Sech[c + d*x]^2*Tanh[c + d*x])/(a + b*Sinh[c + d*x]),x]
 
output
((-1/4*I)*(-((b*Log[I - Sinh[c + d*x]])/(a + I*b)^2) + (b*Log[I + Sinh[c + 
 d*x]])/(a - I*b)^2 - ((4*I)*a*b^2*Log[a + b*Sinh[c + d*x]])/(a^2 + b^2)^2 
 - 1/((a + I*b)*(-I + Sinh[c + d*x])) + 1/((a - I*b)*(I + Sinh[c + d*x]))) 
)/d
 
3.4.60.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.19, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 26, 3316, 26, 27, 593, 25, 657, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tanh (c+d x) \text {sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {i \sin (i c+i d x)}{\cos (i c+i d x)^3 (a-i b \sin (i c+i d x))}dx\)

\(\Big \downarrow \) 26

\(\displaystyle -i \int \frac {\sin (i c+i d x)}{\cos (i c+i d x)^3 (a-i b \sin (i c+i d x))}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle -\frac {i b^3 \int \frac {i \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )^2}d(b \sinh (c+d x))}{d}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {b^3 \int \frac {\sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )^2}d(b \sinh (c+d x))}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \int \frac {b \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )^2}d(b \sinh (c+d x))}{d}\)

\(\Big \downarrow \) 593

\(\displaystyle \frac {b^2 \left (\frac {\int -\frac {a-b \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )}d(b \sinh (c+d x))}{2 \left (a^2+b^2\right )}-\frac {a-b \sinh (c+d x)}{2 \left (a^2+b^2\right ) \left (b^2 \sinh ^2(c+d x)+b^2\right )}\right )}{d}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {b^2 \left (-\frac {\int \frac {a-b \sinh (c+d x)}{(a+b \sinh (c+d x)) \left (\sinh ^2(c+d x) b^2+b^2\right )}d(b \sinh (c+d x))}{2 \left (a^2+b^2\right )}-\frac {a-b \sinh (c+d x)}{2 \left (a^2+b^2\right ) \left (b^2 \sinh ^2(c+d x)+b^2\right )}\right )}{d}\)

\(\Big \downarrow \) 657

\(\displaystyle \frac {b^2 \left (-\frac {\int \left (\frac {2 a}{\left (a^2+b^2\right ) (a+b \sinh (c+d x))}+\frac {a^2-2 b \sinh (c+d x) a-b^2}{\left (a^2+b^2\right ) \left (\sinh ^2(c+d x) b^2+b^2\right )}\right )d(b \sinh (c+d x))}{2 \left (a^2+b^2\right )}-\frac {a-b \sinh (c+d x)}{2 \left (a^2+b^2\right ) \left (b^2 \sinh ^2(c+d x)+b^2\right )}\right )}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b^2 \left (-\frac {\frac {\left (a^2-b^2\right ) \arctan (\sinh (c+d x))}{b \left (a^2+b^2\right )}-\frac {a \log \left (b^2 \sinh ^2(c+d x)+b^2\right )}{a^2+b^2}+\frac {2 a \log (a+b \sinh (c+d x))}{a^2+b^2}}{2 \left (a^2+b^2\right )}-\frac {a-b \sinh (c+d x)}{2 \left (a^2+b^2\right ) \left (b^2 \sinh ^2(c+d x)+b^2\right )}\right )}{d}\)

input
Int[(Sech[c + d*x]^2*Tanh[c + d*x])/(a + b*Sinh[c + d*x]),x]
 
output
(b^2*(-1/2*(((a^2 - b^2)*ArcTan[Sinh[c + d*x]])/(b*(a^2 + b^2)) + (2*a*Log 
[a + b*Sinh[c + d*x]])/(a^2 + b^2) - (a*Log[b^2 + b^2*Sinh[c + d*x]^2])/(a 
^2 + b^2))/(a^2 + b^2) - (a - b*Sinh[c + d*x])/(2*(a^2 + b^2)*(b^2 + b^2*S 
inh[c + d*x]^2))))/d
 

3.4.60.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 593
Int[(x_)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> 
 Simp[(c + d*x)^(n + 1)*(c - d*x)*((a + b*x^2)^(p + 1)/(2*(p + 1)*(b*c^2 + 
a*d^2))), x] - Simp[d/(2*(p + 1)*(b*c^2 + a*d^2))   Int[(c + d*x)^n*(a + b* 
x^2)^(p + 1)*(c*n - d*(n + 2*p + 4)*x), x], x] /; FreeQ[{a, b, c, d, n}, x] 
 && LtQ[p, -1] && NeQ[b*c^2 + a*d^2, 0]
 

rule 657
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( 
x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 
2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.4.60.4 Maple [A] (verified)

Time = 7.81 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.74

method result size
derivativedivides \(\frac {-\frac {2 \left (\frac {\left (\frac {1}{2} a^{2} b +\frac {1}{2} b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-a^{3}-a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {1}{2} a^{2} b -\frac {1}{2} b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {b \left (-a b \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{2}\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 a \,b^{2} \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{4}+4 a^{2} b^{2}+2 b^{4}}}{d}\) \(212\)
default \(\frac {-\frac {2 \left (\frac {\left (\frac {1}{2} a^{2} b +\frac {1}{2} b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (-a^{3}-a \,b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {1}{2} a^{2} b -\frac {1}{2} b^{3}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\frac {b \left (-a b \ln \left (1+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )+\left (a^{2}-b^{2}\right ) \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{2}\right )}{a^{4}+2 a^{2} b^{2}+b^{4}}-\frac {2 a \,b^{2} \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{4}+4 a^{2} b^{2}+2 b^{4}}}{d}\) \(212\)
risch \(-\frac {2 a \,b^{2} d^{2} x}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}-\frac {2 a \,b^{2} d c}{a^{4} d^{2}+2 a^{2} b^{2} d^{2}+b^{4} d^{2}}+\frac {2 a \,b^{2} x}{a^{4}+2 a^{2} b^{2}+b^{4}}+\frac {2 a \,b^{2} c}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {{\mathrm e}^{d x +c} \left (-b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}+b \right )}{d \left (a^{2}+b^{2}\right ) \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}-\frac {i b \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {i b^{3} \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {b^{2} \ln \left ({\mathrm e}^{d x +c}+i\right ) a}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {i b \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{2}}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {i b^{3} \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}+\frac {b^{2} \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) d}-\frac {a \,b^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{d \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}\) \(449\)

input
int(sech(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(-2/(a^4+2*a^2*b^2+b^4)*(((1/2*a^2*b+1/2*b^3)*tanh(1/2*d*x+1/2*c)^3+(- 
a^3-a*b^2)*tanh(1/2*d*x+1/2*c)^2+(-1/2*a^2*b-1/2*b^3)*tanh(1/2*d*x+1/2*c)) 
/(1+tanh(1/2*d*x+1/2*c)^2)^2+1/2*b*(-a*b*ln(1+tanh(1/2*d*x+1/2*c)^2)+(a^2- 
b^2)*arctan(tanh(1/2*d*x+1/2*c))))-2*a*b^2/(2*a^4+4*a^2*b^2+2*b^4)*ln(tanh 
(1/2*d*x+1/2*c)^2*a-2*b*tanh(1/2*d*x+1/2*c)-a))
 
3.4.60.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 926 vs. \(2 (119) = 238\).

Time = 0.27 (sec) , antiderivative size = 926, normalized size of antiderivative = 7.59 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\text {Too large to display} \]

input
integrate(sech(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="fricas 
")
 
output
((a^2*b + b^3)*cosh(d*x + c)^3 + (a^2*b + b^3)*sinh(d*x + c)^3 - 2*(a^3 + 
a*b^2)*cosh(d*x + c)^2 - (2*a^3 + 2*a*b^2 - 3*(a^2*b + b^3)*cosh(d*x + c)) 
*sinh(d*x + c)^2 - ((a^2*b - b^3)*cosh(d*x + c)^4 + 4*(a^2*b - b^3)*cosh(d 
*x + c)*sinh(d*x + c)^3 + (a^2*b - b^3)*sinh(d*x + c)^4 + a^2*b - b^3 + 2* 
(a^2*b - b^3)*cosh(d*x + c)^2 + 2*(a^2*b - b^3 + 3*(a^2*b - b^3)*cosh(d*x 
+ c)^2)*sinh(d*x + c)^2 + 4*((a^2*b - b^3)*cosh(d*x + c)^3 + (a^2*b - b^3) 
*cosh(d*x + c))*sinh(d*x + c))*arctan(cosh(d*x + c) + sinh(d*x + c)) - (a^ 
2*b + b^3)*cosh(d*x + c) - (a*b^2*cosh(d*x + c)^4 + 4*a*b^2*cosh(d*x + c)* 
sinh(d*x + c)^3 + a*b^2*sinh(d*x + c)^4 + 2*a*b^2*cosh(d*x + c)^2 + a*b^2 
+ 2*(3*a*b^2*cosh(d*x + c)^2 + a*b^2)*sinh(d*x + c)^2 + 4*(a*b^2*cosh(d*x 
+ c)^3 + a*b^2*cosh(d*x + c))*sinh(d*x + c))*log(2*(b*sinh(d*x + c) + a)/( 
cosh(d*x + c) - sinh(d*x + c))) + (a*b^2*cosh(d*x + c)^4 + 4*a*b^2*cosh(d* 
x + c)*sinh(d*x + c)^3 + a*b^2*sinh(d*x + c)^4 + 2*a*b^2*cosh(d*x + c)^2 + 
 a*b^2 + 2*(3*a*b^2*cosh(d*x + c)^2 + a*b^2)*sinh(d*x + c)^2 + 4*(a*b^2*co 
sh(d*x + c)^3 + a*b^2*cosh(d*x + c))*sinh(d*x + c))*log(2*cosh(d*x + c)/(c 
osh(d*x + c) - sinh(d*x + c))) - (a^2*b + b^3 - 3*(a^2*b + b^3)*cosh(d*x + 
 c)^2 + 4*(a^3 + a*b^2)*cosh(d*x + c))*sinh(d*x + c))/((a^4 + 2*a^2*b^2 + 
b^4)*d*cosh(d*x + c)^4 + 4*(a^4 + 2*a^2*b^2 + b^4)*d*cosh(d*x + c)*sinh(d* 
x + c)^3 + (a^4 + 2*a^2*b^2 + b^4)*d*sinh(d*x + c)^4 + 2*(a^4 + 2*a^2*b^2 
+ b^4)*d*cosh(d*x + c)^2 + 2*(3*(a^4 + 2*a^2*b^2 + b^4)*d*cosh(d*x + c)...
 
3.4.60.6 Sympy [F]

\[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\int \frac {\tanh {\left (c + d x \right )} \operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \]

input
integrate(sech(d*x+c)**2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x)
 
output
Integral(tanh(c + d*x)*sech(c + d*x)**2/(a + b*sinh(c + d*x)), x)
 
3.4.60.7 Maxima [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.79 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {a b^{2} \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} + \frac {a b^{2} \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} + \frac {{\left (a^{2} b - b^{3}\right )} \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} d} + \frac {b e^{\left (-d x - c\right )} - 2 \, a e^{\left (-2 \, d x - 2 \, c\right )} - b e^{\left (-3 \, d x - 3 \, c\right )}}{{\left (a^{2} + b^{2} + 2 \, {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (a^{2} + b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}\right )} d} \]

input
integrate(sech(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="maxima 
")
 
output
-a*b^2*log(-2*a*e^(-d*x - c) + b*e^(-2*d*x - 2*c) - b)/((a^4 + 2*a^2*b^2 + 
 b^4)*d) + a*b^2*log(e^(-2*d*x - 2*c) + 1)/((a^4 + 2*a^2*b^2 + b^4)*d) + ( 
a^2*b - b^3)*arctan(e^(-d*x - c))/((a^4 + 2*a^2*b^2 + b^4)*d) + (b*e^(-d*x 
 - c) - 2*a*e^(-2*d*x - 2*c) - b*e^(-3*d*x - 3*c))/((a^2 + b^2 + 2*(a^2 + 
b^2)*e^(-2*d*x - 2*c) + (a^2 + b^2)*e^(-4*d*x - 4*c))*d)
 
3.4.60.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 286 vs. \(2 (119) = 238\).

Time = 0.32 (sec) , antiderivative size = 286, normalized size of antiderivative = 2.34 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=-\frac {\frac {4 \, a b^{3} \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{4} b + 2 \, a^{2} b^{3} + b^{5}} - \frac {2 \, a b^{2} \log \left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (a^{2} b - b^{3}\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4}} + \frac {2 \, {\left (a b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} - 2 \, a^{2} b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 2 \, b^{3} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 4 \, a^{3} + 8 \, a b^{2}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}}}{4 \, d} \]

input
integrate(sech(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="giac")
 
output
-1/4*(4*a*b^3*log(abs(b*(e^(d*x + c) - e^(-d*x - c)) + 2*a))/(a^4*b + 2*a^ 
2*b^3 + b^5) - 2*a*b^2*log((e^(d*x + c) - e^(-d*x - c))^2 + 4)/(a^4 + 2*a^ 
2*b^2 + b^4) + (pi + 2*arctan(1/2*(e^(2*d*x + 2*c) - 1)*e^(-d*x - c)))*(a^ 
2*b - b^3)/(a^4 + 2*a^2*b^2 + b^4) + 2*(a*b^2*(e^(d*x + c) - e^(-d*x - c)) 
^2 - 2*a^2*b*(e^(d*x + c) - e^(-d*x - c)) - 2*b^3*(e^(d*x + c) - e^(-d*x - 
 c)) + 4*a^3 + 8*a*b^2)/((a^4 + 2*a^2*b^2 + b^4)*((e^(d*x + c) - e^(-d*x - 
 c))^2 + 4)))/d
 
3.4.60.9 Mupad [B] (verification not implemented)

Time = 2.80 (sec) , antiderivative size = 337, normalized size of antiderivative = 2.76 \[ \int \frac {\text {sech}^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx=\frac {\frac {2\,a}{d\,\left (a^2+b^2\right )}-\frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2+b^2\right )}}{2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1}-\frac {\frac {2\,\left (a^3+a\,b^2\right )}{d\,{\left (a^2+b^2\right )}^2}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (a^2\,b+b^3\right )}{d\,{\left (a^2+b^2\right )}^2}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}+\frac {b\,\ln \left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}{2\,\left (-1{}\mathrm {i}\,d\,a^2+2\,d\,a\,b+1{}\mathrm {i}\,d\,b^2\right )}-\frac {a\,b^2\,\ln \left (b^6\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-14\,a^2\,b^4-a^4\,b^2-b^6+28\,a^3\,b^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+14\,a^2\,b^4\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+a^4\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+2\,a\,b^5\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+2\,a^5\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d\,a^4+2\,d\,a^2\,b^2+d\,b^4}+\frac {b\,\ln \left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,\left (-d\,a^2+2{}\mathrm {i}\,d\,a\,b+d\,b^2\right )} \]

input
int(tanh(c + d*x)/(cosh(c + d*x)^2*(a + b*sinh(c + d*x))),x)
 
output
((2*a)/(d*(a^2 + b^2)) - (2*b*exp(c + d*x))/(d*(a^2 + b^2)))/(2*exp(2*c + 
2*d*x) + exp(4*c + 4*d*x) + 1) - ((2*(a*b^2 + a^3))/(d*(a^2 + b^2)^2) - (e 
xp(c + d*x)*(a^2*b + b^3))/(d*(a^2 + b^2)^2))/(exp(2*c + 2*d*x) + 1) + (b* 
log(exp(c + d*x) + 1i)*1i)/(2*(b^2*d - a^2*d + a*b*d*2i)) + (b*log(exp(c + 
 d*x)*1i + 1))/(2*(b^2*d*1i - a^2*d*1i + 2*a*b*d)) - (a*b^2*log(b^6*exp(2* 
c)*exp(2*d*x) - 14*a^2*b^4 - a^4*b^2 - b^6 + 28*a^3*b^3*exp(d*x)*exp(c) + 
14*a^2*b^4*exp(2*c)*exp(2*d*x) + a^4*b^2*exp(2*c)*exp(2*d*x) + 2*a*b^5*exp 
(d*x)*exp(c) + 2*a^5*b*exp(d*x)*exp(c)))/(a^4*d + b^4*d + 2*a^2*b^2*d)